import request from '@/utils/request'
import type { AxiosResponse } from 'axios';

//定义接口
interface fetchGoodsTotalType {
  date:string
}
interface fetchOrderTotalType {
  date:string
}
//二次封装，只需要传入参数，提取url以及处理返回的数据

export const fetchGoodsTotal = async(data:fetchGoodsTotalType)=>{
  const res = await request.get('/goods/goodstotal',data)
  return res.data
}
export const fetchOrderTotal = async(data:fetchOrderTotalType)=>{
  const res = await request.get('/order/ordertotal',data)
  return res.data
}
